home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Magazine / YAM / Source / includes / mui / Toolbar_mcc.h < prev   
Encoding:
C/C++ Source or Header  |  2000-12-15  |  5.1 KB  |  145 lines

  1. /*
  2. **
  3. ** $VER: Toolbar_mcc.h V15.6
  4. ** Copyright © 1997-00 Benny Kjær Nielsen. All rights reserved.
  5. **
  6. */
  7.  
  8. /*** Include stuff ***/
  9.  
  10. #ifndef TOOLBAR_MCC_H
  11. #define TOOLBAR_MCC_H
  12.  
  13. #ifndef LIBRARIES_MUI_H
  14. #include <libraries/mui.h>
  15. #endif
  16.  
  17. #ifndef EXEC_TYPES_H
  18. #include <exec/types.h>
  19. #endif
  20.  
  21. #ifndef BKN_SERIAL
  22. #define BKN_SERIAL 0xfcf70000
  23. #endif
  24.  
  25. /*** MUI Defines ***/
  26.  
  27. #define MUIC_Toolbar "Toolbar.mcc"
  28. #define ToolbarObject MUI_NewObject(MUIC_Toolbar
  29.  
  30. /*** Methods ***/
  31.  
  32. #define MUIM_Toolbar_BottomEdge      (BKN_SERIAL | 0x07)
  33. #define MUIM_Toolbar_CheckNotify     (BKN_SERIAL | 0x0d)
  34. #define MUIM_Toolbar_DrawButton      (BKN_SERIAL | 0x0c)
  35. #define MUIM_Toolbar_KillNotify      (BKN_SERIAL | 0x02)
  36. #define MUIM_Toolbar_KillNotifyObj   (BKN_SERIAL | 0x03)
  37. #define MUIM_Toolbar_LeftEdge        (BKN_SERIAL | 0x08)
  38. #define MUIM_Toolbar_MultiSet        (BKN_SERIAL | 0x04)
  39. #define MUIM_Toolbar_Notify          (BKN_SERIAL | 0x01)
  40. #define MUIM_Toolbar_Redraw          (BKN_SERIAL | 0x05)
  41. #define MUIM_Toolbar_ReloadImages    (BKN_SERIAL | 0x0b)
  42. #define MUIM_Toolbar_RightEdge       (BKN_SERIAL | 0x09)
  43. #define MUIM_Toolbar_Set             (BKN_SERIAL | 0x06)
  44. #define MUIM_Toolbar_TopEdge         (BKN_SERIAL | 0x0a)
  45.  
  46. /*** Method structs ***/
  47.  
  48. struct MUIP_Toolbar_CheckNotify      {ULONG MethodID; ULONG TrigButton; ULONG TrigAttr; ULONG TrigValue; };
  49. struct MUIP_Toolbar_Edge             {ULONG MethodID; ULONG Button; };
  50. struct MUIP_Toolbar_KillNotify       {ULONG MethodID; ULONG TrigButton; ULONG TrigAttr; };
  51. struct MUIP_Toolbar_KillNotifyObj    {ULONG MethodID; };
  52. struct MUIP_Toolbar_MultiSet         {ULONG MethodID; ULONG Flag; ULONG Value; LONG Button; /* ... */ };
  53. struct MUIP_Toolbar_Notify           {ULONG MethodID; ULONG TrigButton; ULONG TrigAttr; ULONG TrigValue; Object *DestObj; ULONG FollowParams; /* ... */};
  54. struct MUIP_Toolbar_Redraw           {ULONG MethodID; ULONG Changes; };
  55. struct MUIP_Toolbar_ReloadImages     {ULONG MethodID; STRPTR Normal; STRPTR Select; STRPTR Ghost; };
  56. struct MUIP_Toolbar_Set              {ULONG MethodID; ULONG Button; ULONG Flag; ULONG Value; };
  57.  
  58. /*** Special method values ***/
  59.  
  60. #define MUIV_Toolbar_Set_Ghosted     0x04
  61. #define MUIV_Toolbar_Set_Gone        0x08
  62. #define MUIV_Toolbar_Set_Selected    0x10
  63.  
  64. #define MUIV_Toolbar_Notify_Pressed    0
  65. #define MUIV_Toolbar_Notify_Active     1
  66. #define MUIV_Toolbar_Notify_Ghosted    2
  67. #define MUIV_Toolbar_Notify_Gone       3
  68. #define MUIV_Toolbar_Notify_LeftEdge   4
  69. #define MUIV_Toolbar_Notify_RightEdge  5
  70. #define MUIV_Toolbar_Notify_TopEdge    6
  71. #define MUIV_Toolbar_Notify_BottomEdge 7
  72.  
  73. /*** Special value for MUIM_Toolbar_Notify ***/
  74.  
  75. #define MUIV_Toolbar_Qualifier 0x49893135
  76.  
  77. /*** Special method flags ***/
  78.  
  79. /*** Attributes ***/
  80.  
  81. #define MUIA_Toolbar_Description     (BKN_SERIAL | 0x16 )
  82. #define MUIA_Toolbar_HelpString      (BKN_SERIAL | 0x17 )
  83. #define MUIA_Toolbar_Horizontal      (BKN_SERIAL | 0x15 )
  84. #define MUIA_Toolbar_ImageGhost      (BKN_SERIAL | 0x13 )
  85. #define MUIA_Toolbar_ImageNormal     (BKN_SERIAL | 0x11 )
  86. #define MUIA_Toolbar_ImageSelect     (BKN_SERIAL | 0x12 )
  87. #define MUIA_Toolbar_ImageType       (BKN_SERIAL | 0x10 )
  88. #define MUIA_Toolbar_ParseUnderscore (BKN_SERIAL | 0x18 )
  89. #define MUIA_Toolbar_Path            (BKN_SERIAL | 0x1b )
  90. #define MUIA_Toolbar_Permutation     (BKN_SERIAL | 0x1a )
  91. #define MUIA_Toolbar_Qualifier       (BKN_SERIAL | 0x1c )
  92. #define MUIA_Toolbar_Reusable        (BKN_SERIAL | 0x19 )
  93.  
  94. /*** Special attribute values ***/
  95.  
  96. #define MUIV_Toolbar_ImageType_File     0
  97. #define MUIV_Toolbar_ImageType_Memory   1
  98. #define MUIV_Toolbar_ImageType_Object   2
  99.  
  100. /*** Structures, Flags & Values ***/
  101.  
  102. #define TP_SPACE -2
  103. #define TP_END   -1
  104.  
  105. struct MUIP_Toolbar_Description
  106. {
  107.   UBYTE   Type;          /* Type of button - see possible values below (TDT_). */
  108.   UBYTE   Key;           /* Hotkey */
  109.   UWORD   Flags;         /* The buttons current setting - see the TDF_ flags */
  110.   STRPTR  ToolText;      /* The text beneath the icons. */
  111.   STRPTR  HelpString;    /* The string used for help-bubbles or MUIA_Toolbar_HelpString */
  112.   ULONG   MutualExclude; /* Buttons to be released when this button is pressed down */
  113. };
  114.  
  115. /*** Toolbar Description Types ***/
  116.  
  117. #define TDT_BUTTON  0
  118. #define TDT_SPACE   1
  119. #define TDT_IGNORE  2 // Obsolete
  120. #define TDT_END     3
  121.  
  122. #define TDT_IGNORE_FLAG 128
  123.  
  124. /*** Toolbar Description Flags ***/
  125.  
  126. #define TDF_TOGGLE      0x01 /* Set this if it's a toggle-button */
  127. #define TDF_RADIO       0x02 /* AND this if it's also a radio-button */
  128. #define TDF_GHOSTED     0x04
  129. #define TDF_GONE        0x08 /* Make the button temporarily go away */
  130. #define TDF_SELECTED    0x10 /* State of a toggle-button */
  131.  
  132. #define TDF_RADIOTOGGLE (TDF_TOGGLE|TDF_RADIO) /* A practical definition */
  133.  
  134. /* TDF_RADIO and TDF_SELECTED only makes sense
  135.    if you have set the TDF_TOGGLE flag.          */
  136.  
  137. /*** Toolbar Macros ***/
  138.  
  139. #define Toolbar_Button(flags, text)          { TDT_BUTTON, NULL, flags, text, NULL, NULL}
  140. #define Toolbar_KeyButton(flags, text, key)  { TDT_BUTTON, key,  flags, text, NULL, NULL}
  141. #define Toolbar_Space                        { TDT_SPACE,  NULL, NULL,  NULL, NULL, NULL}
  142. #define Toolbar_End                          { TDT_END,    NULL, NULL,  NULL, NULL, NULL}
  143.  
  144. #endif /* TOOLBAR_MCC_H */
  145.